import JJAPPConfig from '../resource/file/appConfig/JJAPPConfig.js'

const { LogLevel } = JJAPPConfig;

const JJLog = {
    debug(message) {
        if (LogLevel <= 0) {
            console.debug(message + '');
        }
    },
    info(message) {
        if (LogLevel <= 1) {
            console.info(message + '');
        }
    },
    log(message) {
        if (LogLevel <= 1) {
            console.info(message + '');
        }
    },
    warn(message) {
        if (LogLevel <= 2) {
            console.warn(message + '');
        }
    },
    error(message) {
        if (LogLevel <= 3) {
            console.error(message + '');
        }
    }
}

export default JJLog;
